<%@ Page Language="VB" Inherits="CMS" MasterPageFile="~/userfiles/mastercms.master" %>

<%@ Import Namespace="System.Data.OLEDB" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Web" %>

<script runat="server">
    'Version: 07.06.2007 Masterdatei angepasst
    Dim mydescription As String
    Dim Zeilenanzahl As Integer = 0
    Dim metaTag As New HtmlMeta
    
    Dim metaTag1 As New HtmlMeta
     
    Sub Page_Load(sender As Object, e As EventArgs)

        If Not IsPostBack Then
 
            'bindlistview()
            
        End If
        'Page.Title = "mytitel"
    End Sub
    
    Sub bindlistview()
        Dim queryvalue As String = Request.QueryString("blog")
        If queryvalue <> "" Then
            blog2.DataSource = tbPages.GetDataSet(strWhere:="pageart = '" & queryvalue & "'", strOrder:="creationdate DESC").Tables(0).DefaultView
        Else
            'blog.DataSource = tbPages.GetDataSet(strWhere:="pageart = 'N'", strOrder:="creationdate DESC").Tables(0).DefaultView
            blog2.DataSource = tbPages.GetDataSet(strWhere:="pageart = 'N'", strOrder:="creationdate DESC").Tables(0).DefaultView
        End If
        blog2.DataBind()
    End Sub
    
    
    
   
    Function GetURL(ByVal fldval As String, ByVal fldval2 As String, ByVal mydescription As String, ByVal mytitel As String) As String
    
        Zeilenanzahl = Zeilenanzahl + 1
        mydescription = mydescription & fldval
        Page.Title = Page.Title & fldval & ", "
        If Zeilenanzahl = 1 Then
            metaTag.HttpEquiv = "Description"
            metaTag1.HttpEquiv = "Keywords"
        End If
        If Zeilenanzahl < 4 Then
            metaTag.Content = metaTag.Content & mydescription & ", "
            Header.Controls.Add(metaTag)
            metaTag1.Content = metaTag1.Content & mytitel & ", "
            Header.Controls.Add(metaTag1)
        End If
    
        Return fldval & "-" & fldval2 & ".aspx"
 
    End Function

</script>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <div class="page-header">
        <h1>Blog </h1>
    </div>

    <asp:ListView runat="server" ID="blog2"
        GroupItemCount="3" DataSourceID="AccessDataSource1">
        <LayoutTemplate>
            <div class="panel panel-default">
                <div class="panel-heading">
                    <asp:DataPager ID="DataPager1" runat="server" PageSize="6" class="btn-group pager-buttons">
                        <Fields>
                            <asp:NextPreviousPagerField ShowLastPageButton="False" ShowNextPageButton="False" ButtonType="Button" ButtonCssClass="btn" RenderNonBreakingSpacesBetweenControls="false" />
                            <asp:NumericPagerField ButtonType="Button" RenderNonBreakingSpacesBetweenControls="false" NumericButtonCssClass="btn" CurrentPageLabelCssClass="btn disabled" NextPreviousButtonCssClass="btn" />
                            <asp:NextPreviousPagerField ShowFirstPageButton="False" ShowPreviousPageButton="False" ButtonType="Button" ButtonCssClass="btn" RenderNonBreakingSpacesBetweenControls="false" />
                        </Fields>
                    </asp:DataPager>
                </div>
                <div class="panel-body">
                    <div class="row" runat="server" id="groupPlaceholder">
                    </div>

                </div>
                <div class="panel-footer">
                    <asp:DataPager ID="DataPager" runat="server" PageSize="6" class="btn-group pager-buttons">
                        <Fields>
                            <asp:NextPreviousPagerField ShowLastPageButton="False" ShowNextPageButton="False" ButtonType="Button" ButtonCssClass="btn" RenderNonBreakingSpacesBetweenControls="false" />
                            <asp:NumericPagerField ButtonType="Button" RenderNonBreakingSpacesBetweenControls="false" NumericButtonCssClass="btn" CurrentPageLabelCssClass="btn disabled" NextPreviousButtonCssClass="btn" />
                            <asp:NextPreviousPagerField ShowFirstPageButton="False" ShowPreviousPageButton="False" ButtonType="Button" ButtonCssClass="btn" RenderNonBreakingSpacesBetweenControls="false" />
                        </Fields>
                    </asp:DataPager>
                </div>
            </div>



            <%-- <table cellpadding="2" runat="server"
           id="tblProducts" style="height:320px">
      <tr runat="server" id="groupPlaceholder">
      </tr>
    </table>--%>

            <%--       <asp:DataPager runat="server" ID="DataPager" PageSize="6"  >
                <Fields>
                    <asp:NumericPagerField ButtonCount="3"
                        PreviousPageText="<--"
                        NextPageText="-->" NumericButtonCssClass="pagination" />
                </Fields>
            </asp:DataPager>--%>
        </LayoutTemplate>

        <GroupTemplate>
            <div class="row" runat="server">
                <div class="col-xs-6 col-sm-4" runat="server" id="itemPlaceholder"></div>

            </div>

            <%-- <tr runat="server" id="productRow"
        style="height:80px">
      <td runat="server" id="itemPlaceholder">
      </td>
    </tr>--%>
        </GroupTemplate>
        <ItemTemplate>
            <div class="col-xs-6 col-sm-4" runat="server">
                <div class="thumbnail">
                    <asp:Image ID="Image2" runat="server" ImageUrl='<%#"~/" + Eval("pageimage")%>' data-src="holder.js/300x200" alt="..." />
                    <div class="caption">
                        <h3>
                            <asp:Label ID="Label1" runat="server" Text='<% #Eval("titel")%>'></asp:Label></h3>
                        <p>
                            <asp:Label ID="Label2" runat="server" Text='<% #Eval("metadescription")%>'></asp:Label>
                        </p>
                        <p>
                            <asp:HyperLink ID="HyperLink1" runat="server"
                                Target="_blank" Text='<% #Eval("Linktext")%>'
                                NavigateUrl='<% #Eval("linkurl")%>' />
                        </p>
                    </div>
                </div>



            </div>

            <%--  <td valign="top" align="center" style="width:100" runat="server">
      <asp:Image ID="ProductImage" runat="server"
           ImageUrl='<%#"~/images/thumbnails/" + 
               Eval("ThumbnailPhotoFileName") %>'
           Height="49" /><br />
      <asp:HyperLink ID="ProductLink" runat="server"
           Target="_blank" Text='<% #Eval("Name")%>'
           NavigateUrl='<%#"ShowProduct.aspx?ProductID=" + 
              Eval("ProductID") %>' />
    </td>--%>
        </ItemTemplate>
    </asp:ListView>


    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/mastercms.mdb" SelectCommand="Select * from tbl_pages where pageart = 'N' ORDER BY creationdate DESC"></asp:AccessDataSource>


    <asp:Label ID="lblSortierung" Font-Size="XX-Small" runat="server" Text=""></asp:Label><br />
</asp:Content>
